# nums1,k1=[23,2,4,6,7],6
# nums2,k2=[23,2,6,4,7],6
# nums3,k3=[23,2,6,4,7],13
def is_series(nums,k):
    for i in range(len(nums)):
        for j in range(i,len(nums)):
            if sum(nums[i:j])==k:
                return True
    return False
# print(is_series(nums1,k1))
# print(is_series(nums2,k2))
# print(is_series(nums3,k3))